<?php
function hoanbn_getproducts($product_cnt=1) {
			//Connect to the OSCommerce database
			$oscommercedb = new wpdb(get_option('hoanbn_dbuser'),get_option('hoanbn_dbpwd'), get_option('hoanbn_dbname'), get_option('hoanbn_dbhost'));
			
			$retval = '';
			for ($i=0; $i<$product_cnt; $i++) {
				//Get a random product
				$product_count = 0;
				while ($product_count == 0) {
					$product_id = rand(0,30);
					$product_count = $oscommercedb->get_var("SELECT COUNT(*) FROM item");
				}
		
				//Build the HTML code
				$retval .= '<div class="oscimp_product">';
				$retval .= 'item count ' . $product_count;
				$retval .= '</div>';
	
			}
			return $retval;
		}
?>